package optimizers.ganeat.oscillator.chaotic;

import java.util.Map;
import javax.swing.JPanel;
import javax.swing.JProgressBar;

import org.w3c.dom.Element;

import common.RunStatus;

import optimizers.commons.RunConfig;
import optimizers.ganeat.GA;
import optimizers.ganeat.Individual;

public class GAChaotic extends GA {
	String initIndiv = "Node gens:\r\n" + " a 45.427 0\r\n" + " b 34.947 0\r\n"
			+ " c 50 0\r\n" + " Iac 0.4766 10\r\n" + "Connection gens:\r\n"
			+ " 1 a->a false 3.7959\r\n" + " 2 a->c true 13.8931\r\n"
			+ " 3 c->b true 12.0435\r\n" + " 6 b->Iac true 28.9895\r\n"
			+ "Exo: 0.6818\r\n" + "Pol: 18.6541\r\n" + "Nick: 2.6789";

	public GAChaotic(RunConfig config, JPanel panelFitness, JPanel panelSpecies,
			JPanel panelIndiv, RunStatus runStatus, JProgressBar progressBar,
			Element fitnessElement) {
		super(config, panelFitness, panelSpecies, panelIndiv, runStatus,
				progressBar, fitnessElement);
	}

	public GAChaotic(RunConfig config, String initIndiv, JPanel panelFitness,
			JPanel panelSpecies, JPanel panelIndiv, RunStatus runStatus,
			JProgressBar progressBar, Element fitnessElement) {
		super(config, panelFitness, panelSpecies, panelIndiv, runStatus,
				progressBar, fitnessElement);
		this.initIndiv = initIndiv;
	}

	@Override
	public Individual getInitialIndividual() {
		return new IndividualChaotic(innovations, nodeNames, -1, 0, config,
				initIndiv);
	}

	@Override
	public Individual getNewIndividual(Map<String, Integer> innovations2,
			Map<String, String> nodeNames2, int i, int j) {
		return new IndividualChaotic(innovations2, nodeNames2, i, j, config);
	}

	@Override
	public String getProblemName() {
		// TODO Auto-generated method stub
		return "ChaoticOscillator";
	}

}
